<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>字面量</title>
</head>
<body>
<h1>文本字面量，用单引号'...'引起来的字符串就是字面量</h1>
    <a th:href="@{'/user/detail?sex=' + ${sex}}">查看性别</a>
    <span th:text="hello"></span>

<h1>数字字面量</h1>
    今年是<span  th:text="2020">1949</span>年<br/>
    20年后<span th:text="2020+20">1949+20</span>年<br/>

<h1>布尔字面量</h1>
    <div th:if="${flag}">
        执行成功
    </div>
<div th:if="${!flag}">
        执行不成功
    </div>

<h1>null字面量</h1>
    <span th:text="${user.id}"></span>
    <span th:text="${user1.id}">没有值</span>
    <div th:unless="${user1 eq null }">
        用户已创建，地址不为空
    </div>
    <div th:if="${user1.id eq null}">
        用户id为空
    </div>

</body>
</html>